<p>There is little valid reason to use the methods of the <code>ThreadGroup</code> class. Some are deprecated (<code>allowThreadSuspension()</code>,
<code>resume()</code>, <code>stop()</code>, and <code>suspend()</code>), some are obsolete, others aren’t thread-safe, and still others are insecure
(<code>activeCount()</code>, <code>enumerate()</code>) . For these reasons, any use of <code>ThreadGroup</code> is suspicious and should be
avoided.</p>
<h2>Compliant Solution</h2>
<pre>
ThreadFactory threadFactory = Executors.defaultThreadFactory();
ThreadPoolExecutor executorPool = new ThreadPoolExecutor(3, 10, 5, TimeUnit.SECONDS, new ArrayBlockingQueue&lt;Runnable&gt;(2), threadFactory);

for (int i = 0; i &lt; 10; i++) {
  executorPool.execute(new JobThread("Job: " + i));
}

System.out.println(executorPool.getActiveCount()); // Compliant
executorPool.shutdown();
</pre>
<h2>See</h2>
<ul>
  <li> <a href="https://wiki.sei.cmu.edu/confluence/x/YzdGBQ">CERT, THI01-J.</a> - Do not invoke ThreadGroup methods </li>
</ul>

